In the area of operating software systems and applications there has been a long standing wish to port and run applications originally created for host systems or mainframes on more modern and powerful computer systems. This often entails offering the same functionality previously available in the software application on the destination system. However, it is often impossible to simply recompile the application's source code on the new system because compilers aren't available on the destination platform.
On top of that a concurrent goal when moving applications to a new platform is to make the source code available in a modern programming language, for example an object oriented programming language. Such a goal may manifest itself in a requirement to transform an application's source code from COBOL, Natural, or PL/1 into Java source code.
Transforming the original source code into a modern programming language enables compilation on many different platforms as such compilers are available on a vast variety of hardware platforms and operating systems. The transformed source code can then easily be compiled on the desired destination system. Additionally, the transformed programs are more easily and cost effectively maintainable and modernizable.
There are known ways to transform source code from one programming language into another automatedly. Language constructs from an original language are mapped to language constructs in a destination language. The goal of this is to create as little difference as possible between the program structure of the original application and the destination program structure, i.e., creating a statement-to-statement transformation of the original source code. This way the original source code and destination source code look very similar, indeed familiar to anyone who knows the original application code. The high resemblance guarantees optimum maintainability.
However, different design paradigms in the original and destination language often make such a statement-to-statement transformation impossible. The original and destination source code exhibit enormous differences. This is exasperated by the fact that the original programming language contains language constructs that are not available in the destination programming language.
Such language constructs are, for example, jump instructions. Procedural languages, like Natural and COBOL often use these to control program flow. Execution of the program stops at one point and continues at another. The programming language Natural has the REINPUT command that forces program execution to continue at the point of the program that last prompted user input. REINPUT may be used anywhere in Natural code.
Heavy use of jump instructions in procedural programming languages leads to large parts of the original source code requiring a transformation that doesn't employ a statement-to-statement transformation. Instead, these parts of the code have to be restructured massively or even require manual reimplementation. Even if the transformed code is semantically correct the transformed code may not be syntactically equivalent to the original code. Such a transformation hence has the disadvantage of not being recognizable compared to the original program structure.